﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using HaiFengShop.Utils;
using HaiFengShop.Filter;
using HaiFengShop.Service;
using System.IO;
using System.DrawingCore.Imaging;
using HaiFengShop.Entity;

namespace HaiFengShop.Controllers
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class AuthController : ControllerBase
    {
        private readonly AuthService authService;

        public AuthController(AuthService authService)
        {
            this.authService = authService;
        }

        [HttpPost]
        public async Task<IActionResult> LoginByWeixin([FromBody]Root postData)
        {
            return Ok(await authService.LoginByWeixin(postData));
        }

    }
}

